xend: Add "dumpcore_in_progress" flag to xenstore information
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 3 Apr 2008 10:37:23 +0000 (11:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 3 Apr 2008 10:37:23 +0000 (11:37 +0100)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendConstants.py
tools/python/xen/xend/XendDomainInfo.py

index bca3ee7dd170de39fb48be6cee1b565e349bed6f..75f9d98c4373a2e081483f2a3b01fd91993e4053 100644 (file)
@@ -96,6 +96,7 @@ ZOMBIE_PREFIX = 'Zombie-'
 MINIMUM_RESTART_TIME = 20
 
 RESTART_IN_PROGRESS = 'xend/restart_in_progress'
+DUMPCORE_IN_PROGRESS = 'xend/dumpcore_in_progress'
 LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
 
 TRIGGER_NMI   = 0
index 5bfc9fa185fff59c0c53b81d7c19bbeac7f079d5..ff5de1cd10abd5280f971210e4c05db9396f0bda 100644 (file)
@@ -1792,10 +1792,13 @@ class XendDomainInfo:
                 raise XendError("Cannot dump core in a directory: %s" %
                                 corefile)
             
+            self._writeVm(DUMPCORE_IN_PROGRESS, 'True')
             xc.domain_dumpcore(self.domid, corefile)
+            self._removeVm(DUMPCORE_IN_PROGRESS)
         except RuntimeError, ex:
             corefile_incomp = corefile+'-incomplete'
             os.rename(corefile, corefile_incomp)
+            self._removeVm(DUMPCORE_IN_PROGRESS)
             log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s",
                           self.domid, self.info['name_label'])
             raise XendError("Failed to dump core: %s" %  str(ex))